GeoPlot
1. Introduction
GeoPlot is a free VBA macro program used in Excel for plotting geochemical data. It has the following major plotting functions: X-Y plot and triangular plot, normalized spidergram, discrimination diagram, and the related functions such as calculating formulas and CIPW norm. GeoPlot also contains many normalization values used for spidergram and many discrimination diagrams. Users can also add new normalization values for spider diagrams and the specification data
for a new discrimination diagram into GeoPlot. This program provides a menu and a toolbar in Excel for allowing easy management of these functions. GeoPlot has the advantage over the existing stand-alone plotting programs in that it allows data to be plotted and visualized easily in the Excel environment, which geochemists use to organize and valuate the data.
2. Installation & Uninstall
Run GeoPlot.exe to install it. Open your Excel workbook and the file of
GeoPlot.xla, which has just been installed. Then user can plot the geochemical data with GeoPlot. If the level of macro security in Excel were high, user
need to set it middle or low to run GeoPlot.xla. GeoPlot is a green program and user can delete the files
directly.
3. Using of GeoPlot
3.1 Data preparation
The geochemical data used by GeoPlot should be arranged in one
simple format, allocating the element names in the first column, sample names in the first row and element values of each sample in the corresponding column in the data worksheet. See the following GIF movie example.
3. 2 Function demonstrating
3.2.1 X-Y plot
Users can enter formula strings or select element names from the Excel worksheet for X and Y axes in the dialog box.
The default axis' linear scale can be manually changed to the logarithmic scale in the charts if necessary.
Users could further make full use of the formula strings to establish the complex X-Y plot, e.g. Pearce ratio diagrams.

3.2.2 Triangular plot
Users can enter formula strings or select element names from the Excel data worksheet for A, B and C apexes in the dialog box.

3.2.3 Spidergram

3.2.4 Discrimination diagram
3.2.5 Calculating Formulas
Users can use the element names and the calculation operators of "+",
"-", "*",
"/", "(",
")", ",",
":"and "^", and
the seven commonly-used functions of Sqrt, Ln, Log10, Log, Exp, Power and Sum in geochemical data processing.
3.2.6 CIPW norm
The CIPW norm in GeoPlot is designed to calculate more samples data (as many as 255 each time in a data worksheet)
GeoPlot uses the following eleven major oxides for common rocks to make normative minerals:
SiO2, TO2, Al2O3, Fe2O3, FeO, MnO, MgO, CaO, Na2O, K2O, P2O5.
This program does not perform any adjustment for Fe molecular ratio
and users could figure out the data of Fe2O3 and FeO from the value of FeOT or Fe2O3T using an appropriate
Fe2+/Fe3+ ratio.
4. Other Functions
4.1 Sorting element data
Geochemists often integrate the data set in a few of worksheets into one, but the data set in each
worksheet are often arranged in different order. The manual integration would take much time and tend to
carry errors into the resulting worksheet. The "Sorting element data" of GeoPlot
is designed to automatically sort the geochemical data in a worksheet in term of the referenced ordinal elements. After sorting the worksheets users can easily copy the
resultant ordered data into one worksheet.
4.2 Decimal digits
Geochemical data are often published with the precision of 1%, and hence the decimal digits must be adjusted. The program's regular
specification is that the data keeps two digits between 0 and 10, one digit between 10 and 100, and no digit if data bigger than 100.
4.3 Data series
Geochemists often analyze many samples that are subdivided into groups or series.
The data of each series must be allocated into continuous columns in an Excel worksheet. The
background colors of the first row, which is used to allocate the sample names, of these columns are uniform. In the X-Y plot, Triangular plot and Discrimination diagram, data are divided into series. And each series has a uniform symbol that is randomly given by Excel. Users can change the symbols of the series as they commonly do on an Excel chart.
5. Database Management
Users can use the file of "User Database.xls" to customize GeoPlot. The structure of this workbook is different with GeoPlot's internal workbook in that there is an additional "Reference" worksheet in "User Database.xls". There are six worksheets in the file of "User Database.xls". Their names are REE NORM, Trace NORM, Reference Data, Elements Sort, Discrimination and Reference, respectively. "Reference" worksheet has useful composition values for user's reference, including the crust, mantle, Chondrite, MORBs, OIB and some typical arc basalts.
Firstly, user can manually add new reference values or defining data for a new discrimination diagram into "User Database.xls" in agreement with the designed format. Secondly, the customizing data can be automatically added into GeoPlot's internal workbook by its "Database Manage" function. Finally, user can selectively use the new customized data in processing their geochemical data. Note that the name of the new reference series must be different from those in GeoPlot; otherwise users cannot add the new customized data into GeoPlot's internal workbook. The following explains how to add a new discrimination diagram.
5.1 Adding of an X-Y type discrimination diagram
Step 1
Note down the x and y data for a line's two points as shown in the following example.
| Line number | Points (circle number) | x value | y value |
| 1 | 1 | 53 | 0 |
| 2 | 53 | 2.5 | |
| 2 | 3 | 57 | 0 |
| 4 | 57 | 3.1 | |
| 3 | 5 | 63 | 0 |
| 6 | 63 | 4 | |
| 4 | 7 | 53 | 0.5 |
| 8 | 63 | 1 | |
| 5 | 9 | 53 | 1.6 |
| 10 | 63 | 2.4 | |
| 6 | 2 | 53 | 2.5 |
| 6 | 63 | 4 |
Step 2
Note down the x and y data for a label's position and the label's
text as the following.
| x value | y value | Label's text |
| 57 | 0.3 | Low-K |
| 57 | 1.3 | Medium-K |
| 57 | 2.3 | High-K |
| 54 | 3 | Basic |
| 58 | 3.6 | Acidic |
Step 3
Define the name of the plot, for example, "New SiO2-K2O, 2005".
Note that the name must be different with those of discrimination diagrams in GeoPlot.
Step 4
Enter the data above and some other specification data into the "Discrimination" worksheet in "User Database.xls" as
illustrated in the following example.
There are 24 columns of specification data that need to be entered, and the details are explained in the following.
1.Input the figure name for every line.
2.Input the discrimination line's x coordinates. If it is a triangular plot,
users should firstly change the original percentages of A ,B and C (A+B+C=1) into x and y values by
using the formulas: X= B+ C/2 and Y=C*0.866.
3.Input the discrimination line's x coordinates. If it is a triangular plot,
users should firstly change the original percentages of A ,B and C (A+B+C=1) into x and y values by
using the formulas: X= B+ C/2 and Y=C*0.866.
4.Input the discrimination line's style: 0 for starting a new line; 1 for the
continuous line; 2 for the dash line; 3 for the dot line; i.e. the number's signification is
the same as that in an Excel XY chart.
5.Input the figure name for every label.
6.Input the label's x coordinates. If it is a triangular plot, users should firstly change the
original percentages of A ,B and C (A+B+C=1) into x and y values by using the formulas: X= B+ C/2 and Y=C*0.866.
7.Input the label's y coordinates. If it is a triangular plot, users should firstly change the
original percentages of A ,B and C (A+B+C=1) into x and y values by using the formulas: X= B+ C/2 and Y=C*0.866.
8.Input the label's text.
9.Input the type of the discrimination (Rock, Ultramafic, Granite,
Basalt): "Rock" stands for classification of a rock. "Ultramafic" stands for discrimination of ultramafic rocks. "Granite" stands for discrimination of granitic rocks. "Basalt" stands for discrimination of basaltic rocks.
10.Input the figure name for the row of defining data.
11.Input the variants, which can be string formulas, of X Y or A B C. The variants are separated by a space.
12.Input the X-axis scale's minimum for the XY plot.
13.In put the X-axis scale's max for the XY plot.
14.Input the X-axis tick's minimum for the XY plot.
15.Input the X-axis tick's max for the XY plot.
16.Input the X-axis scale's method for the XY plot : 0 is for linear and 1 is for logarithmic.
17.Input the Y-axis scale's minimum for the XY plot.
18.Input the Y-axis scale's max for the XY plot.
19.Input the Y-axis tick's minimum for the XY plot.
20.Input the Y-axis tick's max for the XY plot.
21.Input the Y-axis scale's method for the XY plot : 0 is for linear and 1 is for logarithmic.
22.Input the left A label's text for a triangular plot or the X-axis label's text for an XY plot.
23.Input the right B label's text for a triangular plot or the Y-axis label's text for an XY plot.
24.Input the top C label's text for a triangular plot.
Step 5
The new customized data can be automatically added into GeoPlot's internal workbook by its "Database Manage" function. Then user can selectively use the new
customized data for processing the geochemical data.

5.2 Adding an ABC type discrimination diagram
Step 1
Note down the A, B and C (they represent Zr,
Y*3 and
Ti/100 here) for line's two points and the calculated x and y data (A+B+C=1; X= B+ C/2 and
Y=C*0.866) as shown in the following example.
| Line number | Points | A | B | C | x value | y value |
| 1 | 1 | 0.555 | 0.205 | 0.24 | 0.325 | 0.20784 |
| 2 | 0.59 | 0.13 | 0.28 | 0.27 | 0.24248 | |
| 2 | 2 | 0.59 | 0.13 | 0.28 | 0.27 | 0.24248 |
| 3 | 0.385 | 0.115 | 0.50 | 0.365 | 0.433 | |
| 3 | 3 | 0.385 | 0.115 | 0.50 | 0.365 | 0.433 |
| 4 | 0.24 | 0.28 | 0.48 | 0.52 | 0.41568 | |
| 4 | 4 | 0.24 | 0.28 | 0.48 | 0.52 | 0.41568 |
| 5 | 0.205 | 0.405 | 0.39 | 0.6 | 0.33774 | |
| 5 | 5 | 0.205 | 0.405 | 0.39 | 0.6 | 0.33774 |
| 6 | 0.26 | 0.44 | 0.30 | 0.59 | 0.2598 | |
| 6 | 6 | 0.26 | 0.44 | 0.30 | 0.59 | 0.2598 |
| 7 | 0.40 | 0.41 | 0.19 | 0.505 | 0.16454 | |
| 7 | 7 | 0.40 | 0.41 | 0.19 | 0.505 | 0.16454 |
| 8 | 0.55 | 0.35 | 0.10 | 0.4 | 0.0866 | |
| 8 | 8 | 0.55 | 0.35 | 0.10 | 0.4 | 0.0866 |
| 9 | 0.625 | 0.275 | 0.10 | 0.325 | 0.0866 | |
| 9 | 9 | 0.625 | 0.275 | 0.10 | 0.325 | 0.0866 |
| 10 | 0.63 | 0.21 | 0.16 | 0.29 | 0.13856 | |
| 10 | 10 | 0.63 | 0.21 | 0.16 | 0.29 | 0.13856 |
| 1 | 0.555 | 0.205 | 0.24 | 0.325 | 0.20784 | |
| 11 | 1 | 0.555 | 0.205 | 0.24 | 0.325 | 0.20784 |
| 11 | 0.45 | 0.255 | 0.295 | 0.4025 | 0.25547 | |
| 12 | 11 | 0.45 | 0.255 | 0.295 | 0.4025 | 0.25547 |
| 12 | 0.29 | 0.29 | 0.42 | 0.5 | 0.36372 | |
| 13 | 12 | 0.29 | 0.29 | 0.42 | 0.5 | 0.36372 |
| 4 | 0.24 | 0.28 | 0.48 | 0.52 | 0.41568 | |
| 14 | 12 | 0.29 | 0.29 | 0.42 | 0.5 | 0.36372 |
| 6 | 0.26 | 0.44 | 0.30 | 0.59 | 0.2598 | |
| 15 | 11 | 0.45 | 0.255 | 0.295 | 0.4025 | 0.25547 |
| 7 | 0.40 | 0.41 | 0.19 | 0.505 | 0.16454 |
Step 2
Note down the A, B and C (Zr, Y*3 and
Ti/100 here ) for the labels' position and the calculated x and y data (A+B+C=1; X= B+ C/2 and
Y=C*0.866) and the label's text as shown in the following example.
| A | B | C | X | Y | Label's text |
| 0.23 | 0.37 | 0.40 | 0.570 | 0.346 | A |
| 0.35 | 0.35 | 0.30 | 0.500 | 0.260 | B |
| 0.50 | 0.30 | 0.20 | 0.400 | 0.173 | C |
| 0.40 | 0.20 | 0.40 | 0.400 | 0.346 | D |
Step 3
Name the plot, for example "New Zr-Y-Ti, 2005". Please note that the name must be different with
those of diagrams in GeoPlot.
Step 4
Enter the data above and some other specification data into the "Discrimination" worksheet of "User Database.xls" as the following example.
Step 5
Enter the data above and some other specification data into the "Discrimination" worksheet of "User Database.xls" as
shown in the following example.
6. Note
GeoPlot is developed in Windows 2000 and Excel 2000, and debugged in Excel 97/2000/2003/XP. GeoPlot has a control of "RefEdit" in Excel, which is not very stable. When you encounter problems of closing the dialog box with the "RefEdit" control, you should close the application of Excel compulsively. If you discover any bugs, please send email to the developer. Any suggestions to improve the program will be appreciated.
At present, the program can plot a data set of less than 255 samples for setting the element names in the first column and the sample names in the first row in an Excel worksheet. In summary, GeoPlot provides good practicability and enables geochemists to plot data professionally. The source codes are accessible to all users and can be modified for special use.
Developer: Jibin Zhou
Email:zhoujibin123@163.com
Developing data: 03-2005
Guangzhou Institute of Geochemistry Chinese Academy of Sciences, Guangzhou 510640, P.R.China